package com.ruyidd;

import com.jacob.com.LibraryLoader;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.IOException;

/**
 * @author tianxc
 */
@Slf4j
@SpringBootApplication
public class BartenderPrintServiceApplication {

    public static void main(String[] args) {
        log.info("BartenderPrintService 开始启动");
        //System.setProperty("jacob.dll.path","D:\\workspace\\TAC\\git\\project\\bartender-print-service\\src\\main\\resources\\jacob\\jacob-1.19-x64.dll");

        SpringApplication.run(BartenderPrintServiceApplication.class, args);


        try {
            Runtime.getRuntime().exec("cmd /c start http://localhost:13789");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        Runtime.getRuntime().addShutdownHook(new Thread(() -> log.info("BartenderPrintServiceApplication 开始关闭")));
    }

}
